package cn.gok.object;

import java.util.Calendar;

public class Calendar类 {
    public static void main(String[] args) {
        常用方法();

    }

    private static void 常用方法() {
        Calendar calendar = Calendar.getInstance();
        int year =calendar.get(Calendar.YEAR);
        int month =calendar.get(Calendar.MONTH)+1;
        int date =calendar.get(Calendar.DAY_OF_MONTH);
        int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
        System.out.println(year+" "+month+" "+date+" "+dayOfWeek);
    }
}
